Changeset 334 for CMT


Ignore:
Timestamp:
Nov 22, 2006, 6:49:05 PM (18 years ago)
Author:
garonne
Message:

fixed bug with the hidden type package

Location:
CMT/v1r20b1/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • CMT/v1r20b1/source/cmt_parser.cxx

    r333 r334  
    17571757      if (use == 0) continue;
    17581758      if (use->discarded) continue;
     1759      if (use->m_hidden) continue;
    17591760
    17601761      if (use->get_package_name () == "CMT") continue;
     
    29682969
    29692970      if (use->discarded) continue;
     2971      if (use->m_hidden) continue;
    29702972
    29712973      if (!use->located ())
     
    59175919
    59185920          if (use->discarded) continue;
     5921          if (use->m_hidden) continue;
    59195922
    59205923          Package* p = use->get_package ();
     
    67376740           
    67386741            if (use->discarded) continue;
     6742            if (use->m_hidden) continue;
    67396743           
    67406744            if (use->located ())
     
    67796783           
    67806784            if (use->discarded) continue;
     6785            if (use->m_hidden) continue;
    67816786
    67826787            Package* p = use->get_package ();
     
    68386843           
    68396844            if (use->discarded) continue;
     6845            if (use->m_hidden) continue;
    68406846
    68416847            Package* p = use->get_package ();
     
    69816987           
    69826988            if (use->discarded) continue;
     6989            if (use->m_hidden) continue;
    69836990           
    69846991            Package* p = use->get_package ();
  • CMT/v1r20b1/source/cmt_project.cxx

    r333 r334  
    586586      project_use->selected  = true;
    587587      project_use->m_located = true;
    588       project_use->set_auto_imports(On);
     588      project_use->set_auto_imports(Off);
    589589      project_use->initial_scope = ScopePublic;     
    590590      project->set_use(project_use);
  • CMT/v1r20b1/source/cmt_use.cxx

    r333 r334  
    14321432      cout << "Use::reach_package> (" << get_package_name () << " "
    14331433           << version << ")from " << from_path << endl;
     1434          cout << "Use::reach_package> native_version required "<<n_version<<endl;
    14341435    }
    14351436   
     
    15841585      // There are alternate possibilities when it contains wild cards
    15851586      //
    1586       if ((version == "") ||
    1587           (version.find ("*") != cmt_string::npos))
     1587      if ((version == "") || (version.find ("*") != cmt_string::npos))
    15881588        {
    15891589          static CmtSystem::cmt_string_vector versions;
     
    15981598          if (n_version != "")
    15991599          {
    1600               static CmtSystem::cmt_string_vector native_versions;           
     1600              CmtSystem::cmt_string_vector native_versions;           
    16011601              for (int i = 0; i < versions.size (); i++)
    16021602              {
     
    16211621                          int pos = nv.find ('\n');
    16221622                          if (pos != cmt_string::npos) nv.erase (pos);
    1623                           pos = nv.find ('\r');
     1623                          pos     = nv.find ('\r');
    16241624                          if (pos != cmt_string::npos) nv.erase (pos);
    16251625                          if (nv == n_version)
    16261626                          {
    16271627                               cmt_string& name_entry = native_versions.add ();
    1628                                name_entry += versions[i];
     1628                               // We have found at least one
     1629                               // cout <<"native_version :"<<n_version<<" ,version: "<< versions[i]<<endl;
     1630                               this->native_version   = n_version;
     1631                               name_entry            += versions[i];
    16291632                          }
    16301633                      }                   
     
    17491752public:
    17501753  UseProjectAction (Use* use, cmt_string n_version="") : m_use (use), m_found (false), native_version(n_version)
    1751  
    17521754  {
    17531755  }
     
    17661768
    17671769    if (m_use->reach_package (path, this->native_version))
    1768       {
     1770    {
    17691771        if (Cmt::get_debug ())
    17701772          {
     
    18881890  // Second try is among the CMTPATHs
    18891891  //
    1890      
    18911892  UseProjectAction pa (this, native_version);
    18921893
     
    19971998                    const cmt_string& package,
    19981999                    const cmt_string& version,
     2000                    const cmt_string& n_version,
    19992001                    Use** old_use,
    2000                     Use* context_use)
     2002                            Use* context_use)
    20012003{
    20022004  bool new_request = add_request (path, package, version);
    2003 
     2005   
    20042006  Use& current_use = Use::current ();
    20052007
     
    20862088              (path == use.specified_path))
    20872089            {
     2090             
    20882091              if (Cmt::get_debug ())
    2089                 {
    2090                   cout << " ... exactly same version and path!" << endl;
    2091                 }
    2092              
     2092                  {
     2093                      cout << " ... exactly same version and path!" << endl;
     2094                  }           
    20932095              do_need_new = false; // We don't need a new one
    2094             }
     2096              if (n_version != use.native_version)
     2097              {
     2098                  if (Cmt::get_debug ())
     2099                       cout << " ... but native_version differs (" <<n_version<<"!="<<use.native_version<<") !" <<endl;
     2100                  do_need_new = true;   
     2101              }       
     2102           }
    20952103          else if (version != use.specified_version)
    20962104            {
     
    22112219             
    22122220                  do_need_new = false; // We don't need a new one
     2221                  if (n_version != use.native_version)
     2222              {
     2223                  if (Cmt::get_debug ())
     2224                       cout << " ... but native_version differs (" <<n_version<<"!="<<use.native_version<<") !" <<endl;
     2225                  do_need_new = true;   
     2226              }
     2227                 
    22132228                }
    22142229              else if (version != use.specified_version)
     
    23102325                  const cmt_string& version,
    23112326                  const cmt_string& version_alias,
    2312                   const cmt_string& path_alias)
     2327                  const cmt_string& path_alias,
     2328                  const cmt_string& n_version)
    23132329{
    23142330  Package* p = 0;
     
    23242340
    23252341      if ((use->specified_version == version) &&
    2326           (use->specified_path == path)) return (use);
     2342          (use->specified_path == path) && use->native_version==n_version) return (use);
    23272343    }
    23282344
     
    23592375  Use* use = 0;
    23602376
    2361   do_need_new = need_new (path, package_name, version, &old_use, context_use);
    2362   //cout <<"native_version: "<<native_version<<" "<<version<<endl;
    2363    
     2377  do_need_new = need_new (path, package_name, version, native_version, &old_use, context_use);
    23642378
    23652379  if (Cmt::get_debug ())
    23662380    {
    2367       if (old_use != 0)
     2381      if (old_use != 0 && !do_need_new)
    23682382        {
    23692383          cout << "add> old_use " << old_use->get_package_name () <<
     
    23762390  if (do_need_new)
    23772391    {
    2378       use = create (path, package_name, version, version_alias, path_alias);
     2392      use = create (path, package_name, version, version_alias, path_alias, native_version);
    23792393    }
    23802394  else
     
    25032517      if (Cmt::get_debug ())
    25042518        {
    2505           cout << "select? [" << use << "] vs old_use[" << old_use << "] "
     2519          cout << "select? [" << use << "] "<< use->version <<" vs old_use[" << old_use << "] "
    25062520               << old_use->get_package_name ()
    25072521               << " " << old_use->version
     
    25282542            //
    25292543          static BestFitSelector selector;
    2530           Use* selected_use = selector.operate (old_use, use);
     2544      Use* selected_use = selector.operate (old_use, use);
    25312545
    25322546          if (Cmt::get_debug ())
     
    25442558          if (use != selected_use)
    25452559            {
    2546               use = use->set_selected_version (selected_use);
     2560                   use = use->set_selected_version (selected_use);
    25472561            }
    25482562         
     
    35453559
    35463560      if (use->discarded) continue;
     3561      if (use->m_hidden) continue;
    35473562
    35483563      if (!use->located ()) continue;
     
    42354250
    42364251
    4237 
    4238 
    4239 
    4240 
    42414252Package* Package::find (const cmt_string& name)
    42424253{
  • CMT/v1r20b1/source/cmt_use.h

    r331 r334  
    6464                      const cmt_string& version,
    6565                      const cmt_string& version_alias,
    66                       const cmt_string& path_alias);
     66                      const cmt_string& path_alias,
     67                      const cmt_string& n_version="");
    6768
    6869  void add_sub_use(Use* use)
     
    189190                        const cmt_string& package,
    190191                        const cmt_string& version,
     192                        const cmt_string& n_version,
    191193                        Use** old_use,
    192194                                    Use* context_use);
Note: See TracChangeset for help on using the changeset viewer.